package com.cha.chaCommon.core.exception;

import org.springframework.stereotype.Component;

/**
 * ---厚德载物---
 *
 * @Author wangbo
 * @Date 2024/10/14
 * @Desc 人的一生适可而止
 */
public class CustomerException extends RuntimeException{
    private int code;//异常编码
    private String msg;//异常信息
    public CustomerException() {

    }
    public CustomerException(String msg) {
        this.code=500;
        this.msg = msg;
    }
    public CustomerException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
